package com.pro.entity;

import java.util.Objects;

/**
 * @ClassName: UserAuthority
 * @Author: 笑笑
 * @DATE: 2021/11/11
 * @TIME: 下午 06:29
 */
public class UserAuthority {
    private long id;
    private long userId;
    private long authorityId;
    private long type;
    private String remarks;

    public UserAuthority() {
    }

    public UserAuthority(long id, long userId, long authorityId, long type, String remarks) {
        this.id = id;
        this.userId = userId;
        this.authorityId = authorityId;
        this.type = type;
        this.remarks = remarks;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getAuthorityId() {
        return authorityId;
    }

    public void setAuthorityId(long authorityId) {
        this.authorityId = authorityId;
    }

    public long getType() {
        return type;
    }

    public void setType(long type) {
        this.type = type;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserAuthority that = (UserAuthority) o;
        return id == that.id &&
                userId == that.userId &&
                authorityId == that.authorityId &&
                type == that.type &&
                Objects.equals(remarks, that.remarks);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userId, authorityId, type, remarks);
    }

    @Override
    public String toString() {
        return "UserAuthority{" +
                "id=" + id +
                ", userId=" + userId +
                ", authorityId=" + authorityId +
                ", type=" + type +
                ", remarks='" + remarks + '\'' +
                '}';
    }
}
